import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    // feat: 改名mainvue2 mainvue3成功。知识点：子应用路由要包含主应用activeRule
    path: '/mainvue2',
    name: 'Home',
    component: Home
  },
  {
    path: '/mainvue2/about',
    name: 'About',
    component: () => import('../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: window.__POWERED_BY_QIANKUN__ ? '/vue2/' : '/',
  routes
})

export default router 